package com.BraveY.Demo04;

public class Student {
    private String name;
    private int age;

    //无参构造函数
    public Student() {
    }

    //有参构造函数
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    // 姓名
    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    // 年龄
    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return this.age;
    }
}
